﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BHXH.Frm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public void showControl(System.Windows.Forms.Control obj)
        {
            panel1.Controls.Clear();
            obj.Dock = DockStyle.Fill;
            panel1.Controls.Add(obj);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            UserControl1 u1 = new UserControl1();
            showControl(u1);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            UserControl2 u2 = new UserControl2();
            showControl(u2);
        }
    }
}
